package constans

import "go-zero-project/common/global"

const UserNoExistError uint32 = 200000
const CreateTokenError uint32 = 200001
const UserDisableErr uint32 = 200002
const PasswordErr uint32 = 200003
const RoleNoExistError uint32 = 200004
const DeptNoExistError uint32 = 200005
const MenuNoExistError uint32 = 200006
const MenuNameRepeatError uint32 = 200007
const PermsRepeatError uint32 = 200008
const MenuUrlRepeatError uint32 = 200009
const MenuPermsNotEmptyError uint32 = 200010
const MenuUrNotEmptyError uint32 = 200011
const ParentMenuNotExistError uint32 = 200012
const ParentTypeOnlyCatalogError uint32 = 200013
const ParentTypeOnlyMenuError uint32 = 200014
const DeleteMenuError uint32 = 200015
const RoleNameIsExistError uint32 = 200016
const RoleNoSelectMenu uint32 = 200017
const DeptExistError uint32 = 200018
const DeptRepeatError uint32 = 200019

func init() {
	global.ErrorMessageMap[UserNoExistError] = "未查询到用户信息"
	global.ErrorMessageMap[CreateTokenError] = "创建token失败"
	global.ErrorMessageMap[UserDisableErr] = "该用户被禁止,请联系管理员"
	global.ErrorMessageMap[PasswordErr] = "账号密码错误"
	global.ErrorMessageMap[RoleNoExistError] = "未查询到角色信息"
	global.ErrorMessageMap[DeptNoExistError] = "未查询到部门信息"
	global.ErrorMessageMap[MenuNoExistError] = "未查询到菜单信息"
	global.ErrorMessageMap[MenuNameRepeatError] = "菜单名称重复"
	global.ErrorMessageMap[PermsRepeatError] = "菜单权限标识重复"
	global.ErrorMessageMap[MenuUrlRepeatError] = "菜单Url重复"
	global.ErrorMessageMap[MenuPermsNotEmptyError] = "菜单权限标识不能为空"
	global.ErrorMessageMap[MenuUrNotEmptyError] = "菜单Url不能为空"
	global.ErrorMessageMap[ParentMenuNotExistError] = "上级菜单不存在"
	global.ErrorMessageMap[ParentTypeOnlyCatalogError] = "上级只能是目录类型"
	global.ErrorMessageMap[ParentTypeOnlyMenuError] = "上级只能是菜单类型"
	global.ErrorMessageMap[DeleteMenuError] = "请先删除下面子节点"
	global.ErrorMessageMap[RoleNameIsExistError] = "角色名称已存在"
	global.ErrorMessageMap[RoleNoSelectMenu] = "未选择角色菜单权限"
	global.ErrorMessageMap[DeptExistError] = "添加部门已经存在"
	global.ErrorMessageMap[DeptRepeatError] = "部门名称重复"
}
